package cn.liumouren.controller;

import cn.liumouren.entity.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class BaseExceptionHandler {

    @ExceptionHandler(Exception.class)
    public Result base(Exception e) {
        System.out.println(e.getMessage());
        return new Result(false,"未知错误!");
    }
}
